package zucc.edu.cn.chengchengparttime.My;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
import android.widget.ImageView;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.AppCompatButton;

import java.util.ArrayList;
import java.util.List;

import zucc.edu.cn.chengchengparttime.MainActivity;
import zucc.edu.cn.chengchengparttime.R;

public class MyPersonalData extends AppCompatActivity {
    private Context context;
    private List<String> data=new ArrayList<>(); //数据列表

    private AppCompatButton btn_modifyPersonaldata;
    private ImageView goback;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_my_personaldata);
        context=this.getBaseContext();

        btn_modifyPersonaldata=findViewById(R.id.btn_modifyPersonaldata);
        btn_modifyPersonaldata.setOnClickListener(view -> {
            Toast.makeText(this.context, "点击了修改个人资料" , Toast.LENGTH_SHORT).show();
            //跳转到修改个人资料界面
            Intent intent = new Intent(MyPersonalData.this, MyPersonalData_Modify.class);
            startActivity(intent);
        });

        goback=findViewById(R.id.goback);
        goback.setOnClickListener(view -> {
            Toast.makeText(this.context, "点击了返回" , Toast.LENGTH_SHORT).show();
            //跳转到我的界面（首先要跳转到MainActivity，然后跳转到MyFragment）
            Intent i=new Intent();
            i.setClass(MyPersonalData.this, MainActivity.class);
                //一定要指定是第几个pager，这里填写3
            i.putExtra("id",3);
            startActivity(i);
        });
    }
}
